import { _decorator, Component, Node } from "cc";
const { ccclass, property } = _decorator;

//事件名称
enum EventName {
    FINISHED_WALK = 'finished-walk',
    START_BRAKING = 'start-braking',
    END_BRAKING = 'end-braking',
    SHOW_COIN = 'show-coin',
    GAME_START = 'game-start',          //游戏开始
    GAME_RESTART = 'game-restart',      //重新开始
    GAME_OVER = 'game-over',            //游戏结束
    NEW_LEVEL = 'new-level',            //下一关
    MONSTER_MOVE = 'monster-move',      //怪物移动
    SHOW_GUIDE = 'show-guide',
    UPDATE_PROGRESS = 'update-progress',
}

//音频资源
enum AudioSource {
    BACKGROUND = 'background',
    CLICK = 'click',
    CRASH = 'crash',
    GETMONEY = 'getMoney',
    INCAR = 'inCar',
    NEWORDER = 'newOrder',
    START = 'start',
    STOP = 'stop',
    TOOTING1 = 'tooting1',
    TOOTING2 = 'tooting2',
    WIN = 'win',
}


@ccclass("Constants")
export class Constants {
    public static EventName = EventName;
    public static AudioSource = AudioSource;

    //UI界面名称的枚举
    public static UIPage = {
        mainPanel: 'MainPanel',
        gamePanel: 'GamePanel',
        failPanel: 'FailPanel',
        winPanel: 'WinPanel',
    };

    public static GameConfigID = 'BBI_GAME_CACHE';
    public static PlayerConfigID = 'playerInfo';
    public static MaxLevel = 20;
}
